//Manager For Camera Classes

#ifndef CAMERAMANAGER_H
#define CAMERAMANAGER_H

#include <map>
#include <string>

#include "Singleton.h"
#include "NonCopyable.h"

#include "ICamera.h"
//#include "Frustum.h"

// Stores the GameStates in a map sorted by the state name.
typedef std::map<std::string,ICamera*> CameraMap;

class CameraManager : public NonCopyable
{
public:
	void SetCamera(const char* CameraName);
	bool AddCamera(const std::string& CameraName, ICamera* cam);

	void BuildCameraProjectionMatrix(float fov, float aspect, float nearZ, float farZ);

	void Update();
	void DrawPreCamPos();

	ICamera* GetActiveCamera() {return m_ActiveCamera;}

private:
	friend class Singleton<CameraManager>;
	CameraManager();

private:
	CameraMap m_Cameras;

	ICamera* m_ActiveCamera;
	ICamera* m_PreCamera;
	//Frustum* m_Frustum;

	Matrix4x4 m_Proj;
};

typedef Singleton<CameraManager> TheCameraManager;

#endif